
#ifndef _DRIVER_IIC_H
#define _DRIVER_IIC_H

#include "stdint.h"
#include "gd32f30x_i2c.h"


#define IIC_SLAVE_ADDRESS  0xD4

extern void iic_init(void);
extern int8_t iic_read_byte(uint32_t IIC_NUM, int8_t addr, int8_t reg);

extern void iic_buffer_read(uint32_t IIC_NUM, uint8_t* p_buffer, uint8_t slave_address, uint8_t read_address, uint16_t number_of_byte);

extern void iic_byte_write(uint32_t IIC_NUM, uint8_t slave_address, uint8_t write_address, uint8_t p_buffer);
#endif


